//getPrototypeof 用于获取一个对象的原型

let animal = {
   eats:true
}
let rabbit = Object.create(animal);
console.log(Object.getPrototypeOf(rabbit)===animal)
console.log(Object.getPrototypeOf(animal)===Object.prototype)

//setPrototypeOf 用于设置对象的原型

let cat = Object.create(null);
console.log(Object.getPrototypeOf(cat))
Object.setPrototypeOf(cat,animal);
console.log(Object.getPrototypeOf(cat))